/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package millenium3dchess;

/**
 *
 * @author Kenneth
 */
public abstract class Player {
    
    //from http://stackoverflow.com/questions/446663/best-way-to-define-error-codes-strings-in-java
    public enum Error {
        WRONG_COLOR(0, "That is not your piece."),
        INVALID_MOVE(1, "That is an invalid move."),
        BAD_INPUT(2, "Command not recognized."),
        SQUARE_OCCUPIED(3, "That square cannot be moved to.");
        private final int code;
        private final String description;

        private Error(int code, String description) {
            this.code = code;
            this.description = description;
        }

        public String getDescription() {
            return description;
        }

        public int getCode() {
            return code;
        }

        @Override
        public String toString() {
            return code + ": " + description;
        }
    }
    
    final GameSquare[][][] gameboard;
    final Game.Color color;

    public Player(GameSquare[][][] g, Game.Color c) {
        gameboard = g;
        color = c;
    }

    //returns 2 vectors, the first is where the piece is
    //the second is where the piece is going
    //It is this method's responsibility to check if a move is legal
    abstract Gamevector[] move();
}
